Skip to content

Conversation

@toupper
Copy link
Contributor

@toupper toupper commented Nov 27, 2025

Part of WOOMOB-1786

Description

With this PR we add the refunds button to the order details and move the email action to the ellipsis menu.

Notes:

  • The right logic for showing the refunds button (i.e., not all items are refunded, the order was paid) is coming in a subsequent PR
  • I’m following the inner padding of the native Menu element in the iOS SDK, which is slightly narrower than the design. This approach aligns with the Apple Human Interface Guidelines and simplifies the code by relying on the native component.

Test Steps

  1. Go to POS
  2. Go to Orders
  3. On a completed order, check that the buttons are properly shown.

Screenshots

My Store 4


  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@toupper toupper added this to the 23.8 milestone Nov 27, 2025
@toupper toupper requested a review from iamgabrielma November 27, 2025 16:02
@wpmobilebot
Copy link
Collaborator

App Icon📲 You can test the changes from this Pull Request in WooCommerce iOS Prototype by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS Prototype
Build Numberpr16414-6ab9391
Version23.7
Bundle IDcom.automattic.alpha.woocommerce
Commit6ab9391
Installation URL2fmarl48eun8g
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot wpmobilebot modified the milestones: 23.8, 23.9 Dec 1, 2025
@wpmobilebot
Copy link
Collaborator

Version 23.8 has now entered code-freeze, so the milestone of this PR has been updated to 23.9.

@iamgabrielma iamgabrielma self-assigned this Dec 2, 2025
Copy link
Contributor

@iamgabrielma iamgabrielma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m following the inner padding of the native Menu element in the iOS SDK, which is slightly narrower than the design. This approach aligns with the Apple Human Interface Guidelines and simplifies the code by relying on the native component.

If this is different from the design let's be sure we align with Wagner to update it as well, so there is no discrepancies later when testing or with Android

I also see no ellipsis on the designs from WOOMOB-1786, is there a different Figma file I should be looking to?

// MARK: - Actions
private extension POSOrderDetailsView {
enum POSOrderDetailsAction: Identifiable, CaseIterable {
enum POSAction: Identifiable, CaseIterable {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this rename necessary? It makes the POSAction too generic for what is doing, I'd revert it to be POSOrderDetailsAction or something specific to actions to this view. Specially when reaching to .priority or .isAvailable() props they lose readability unless we look into the implementation.


func available(for order: POSOrder) -> Bool {
func isAvailable(for order: POSOrder, flags: POSFeatureFlagProviding) -> Bool {
guard order.status == .completed else { return false }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check breaks the current behavior of showing the "send receipt" button for refunded orders, since will return early if the order is not completed. It should show like this:

Simulator Screenshot - iPad mini (A17 Pro) - US store - 2025-12-03 at 07 47 52

EmptyView()
} else {
HStack(spacing: POSSpacing.large) {
let primary = actions[0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's be explicit on which action is triggering rather than rely on array order, using the specific enum case or others.

Comment on lines +448 to +451
let overflow = actions.dropFirst()
if !overflow.isEmpty {
Menu {
ForEach(Array(overflow)) { action in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure to understand this bit, could you clarify what it does? Why are we dropping the first result when rendering the menu options?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessarily for this PR, but we should move this logic either up to the model or to a helper so can be tested that we're rendering the correct buttons for all order status cases with feature flag on/off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants